import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [

  /*{
    path: '/Login', //登录
    name: 'Login',
    component:Login
  },*/
  {
    path: '/', //主页
    name: 'Manage',
    component: () => import('../views/Manage'),
    redirect: "/pandect",
    children: [
      { path: 'pandect', name: 'Pandect', meta: {title: '总览'}, component: () => import('../views/pandect') },
      { path: 'duties', name: 'duties', meta: {title: '组织机构 / 职务管理'}, component: () => import('../views/duties') },
      { path: 'organization', name: 'organization', meta: {title: '组织机构 / 组织管理'}, component: () => import('../views/organization') },
      { path: 'post', name: 'post', meta: {title: '组织机构 / 岗位管理'}, component: () => import('../views/post') },
      { path: 'socialScheme', name: 'socialScheme', meta: {title: '社保公积金 / 社保方案'}, component: () => import('../views/socialScheme') },
      { path: 'socialSetup', name: 'socialSetup', meta: {title: '社保公积金 / 社保方案 / 添加社保方案'}, component: () => import('../views/socialSetup') },
      { path: 'upSocialSetup', name: 'upSocialSetup', meta: {title: '社保公积金 / 社保方案 / 修改社保方案'}, component: () => import('../views/upSocialSetup') },
      { path: 'accumScheme', name: 'accumScheme', meta: {title: '社保公积金 / 公积金方案'}, component: () => import('../views/accumScheme') },
      { path: 'accumSetup', name: 'accumSetup', meta: {title: '社保公积金 / 公积金方案 / 添加公积金方案'}, component: () => import('../views/accumSetup') },
      { path: 'upAccumSetup', name: 'upAccumSetup', meta: {title: '社保公积金 / 公积金方案 / 修改公积金方案'}, component: () => import('../views/upAccumSetup') },
      { path: 'decreasePersonnel', name: 'decreasePersonnel', meta: {title: '社保公积金 / 增减人员'}, component: () => import('../views/decreasePersonnel') },
      { path: 'insurancePersonnel', name: 'insurancePersonnel', meta: {title: '社保公积金 / 增减人员 / 办理增员'}, component: () => import('../views/insurancePersonnel') },
    ]
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
